#!/usr/bin/env python3

import netservice, sys, socket

if __name__ == '__main__':
  try:
    title = netservice.getTitle(sys.argv[1]).strip()
    print(title)
  except socket.timeout:
    print('timed out')
